<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>显示模式转换</title>
    <style>
        /* 块级：独占一行；默认宽度是父级的100%；加宽高生效 */
        /* div {
            display: inline;
            display: inline-block;

        } */
        .div1 {
            width: 100px;
            height: 100px;
            background-color: brown;
        }
        .div2 {
            width: 100px;
            height: 100px;
            background-color: orange;
        }



        /* 行内：一行共存多个；尺寸由内容撑开；加宽高不生效  */
        span {
            width: 200px;
            height: 200px;

            /* display: block; */
            /* display: inline-block; */
            
        }


        .sapn1 {
            background-color: brown;
        }

        .span2 {
            background-color: orange;
        }
        


        /* 行内块：一行共存多个；默认尺寸由内容撑开；加宽高生效  */
        img {
            width: 100px;
            height: 100px;

            /* display: inline; */
            display: block;
        }

    </style>
</head>
<body>
    <!-- 块元素 -->
    <div class="div1">这是div标签1</div>
    <div class="div2">这是div标签2</div>

    <!-- 行内元素 -->
     <span class="sapn1">span1111111111111111111111111111111111</span>
     <span class="span2">span2</span>
    
    <!-- 行内块元素 -->
     <img src="./images/1.png" alt="">
     <img src="./images/1.png" alt="">
     


</body>
</html>